package com.kemai.designmode.ui
import android.os.Bundle
import com.kemai.common.adapter.ItemClickListener
import com.kemai.common.ui.BaseActivity
import com.kemai.designmode.R
import com.kemai.designmode.proxy.ProxyOrder

//代理模式调用(将某个任务给第三方代自己去实现)
class ProxyActivity : BaseActivity(), ItemClickListener {
    private val studyContent = arrayOf("代我下海外订单")
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_common_content)
        findViewById()
        setTiTle("代理模式")
        setAdapterContent(studyContent,ProxyActivity@this,ProxyActivity@this)
    }

    override fun itemClick(position: Int) {
        when(position){
            0->{
             ProxyOrder().saveOrder()
            }
        }
    }

}